<?php

namespace Sifast\ProjectBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Form\FormMapper;

class AugmentationsAdmin extends Admin
{
 
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
        ->with('L1')
            ->add('montantAugmIndividuelle','text',array(
                'label'=> 'Montant augm. individuelle:',))
            ->add('pourcentageAugmIndiv','text',array(
                'label'=> "Pourcentage augm. individuelle :",))
        ->end()
        ->with('L2')        
            ->add('ctypeAugmIndiv','text',array(
                'label'=> 'Type augm. individuelle:',))
            ->add('ctypeAugmCollective','text',array(
                'label'=> 'Type augm. collective:',))
        ->end();
            
    }

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
           ->add('montantAugmIndividuelle')
           ->add('pourcentageAugmIndiv')
           ->add('ctypeAugmIndiv')
           ->add('ctypeAugmCollective');
            
    }

    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper            
            ->addIdentifier('montantAugmIndividuelle')
            ->add('pourcentageAugmIndiv')
            ->add('ctypeAugmIndiv')
            ->add('ctypeAugmCollective');
            
            }
}